package com.cn.lotary.base.dao;

import java.io.Serializable;
import java.util.Date;

/**
 *
 * @author Jason Chen 22-May-2012
 */
public interface BaseEntity extends Serializable {

    /**
     * <br> get entity primary key<br/>
     *
     * @return entity primary key
     */
    String getId();

    void setId(String id);

    /**
     * Judge whether the entity is new
     *
     * @return boolean if id is null return true, else return false
     */
    boolean isNew();

    Date getCreateTime();

    void setCreateTime(Date date);

    Date getUpdateTime();

    void setUpdateTime(Date date);

    @Override
    boolean equals(Object obj);

    @Override
    int hashCode();

    @Override
    String toString();
}
